var e = require;
var t = module;
var o = exports;
Object.defineProperty(o, "__esModule", {value: !0});
var n = e("BaseModuleUI"),
    a = e("NotifyEventType"),
    i = e("GlobalParams"),
    r = e("role_node"),
    s = cc._decorator,
    l = s.ccclass,
    c =
        (s.property,
        (function (e) {
            function t() {
                var t = (null !== e && e.apply(this, arguments)) || this;
                return (t.role_node = null), t;
            }
            return (
                __extends(t, e),
                (t.prototype.initView = function () {
                    this.role_node = this.node.getComponent(r.default);
                }),
                (t.prototype.addEvent = function () {
                    this.attachEvent(a.default.SEND_PLAYER_MOVE_INFO, this.playerMoveInfo, this),
                        this.attachEvent(a.default.SEND_PLAYER_STOP_MOVE_INFO, this.playerStopMove, this),
                        this.attachEvent(a.default.SEND_PLAYER_FREE_SKILL, this.showPlayerSkill, this),
                        this.attachEvent(a.default.SEND_PLAYER_FREE_SKILL_ONE, this.showSkillOne, this),
                        this.attachEvent(a.default.SEND_PLAYER_FREE_SKILL_TWO, this.showSkillTwo, this),
                        this.attachEvent(a.default.SEND_PLAYER_USE_PLAYER_SKILL, this.usePlayerSkill, this);
                }),
                (t.prototype.playerMoveInfo = function (e, t) {
                    i.GlobalParams.GameStart && this.role_node.roleMoveInfo(t);
                }),
                (t.prototype.playerStopMove = function () {
                    i.GlobalParams.GameStart && this.role_node.roleStopMove();
                }),
                (t.prototype.showPlayerSkill = function () {
                    this.role_node.roleCommonSkill();
                }),
                (t.prototype.showSkillOne = function () {
                    this.role_node.roleSpecialSkillOne();
                }),
                (t.prototype.showSkillTwo = function () {
                    this.role_node.roleSpecialSkillTwo();
                }),
                (t.prototype.usePlayerSkill = function (e, t) {
                    if (i.GlobalParams.GameStart)
                        switch (t) {
                            case 1:
                                cc.log("===疾跑==="), this.role_node.showSprintSkill();
                                break;
                            case 2:
                                cc.log("===加血==="), this.role_node.showAddHpSkill();
                                break;
                            case 3:
                                cc.log("===点燃==="), this.role_node.showLightSkill();
                                break;
                            case 4:
                                cc.log("===虚弱==="), this.role_node.showWeaknessSkill();
                                break;
                            case 5:
                                cc.log("===斩杀==="), this.role_node.showKillSkill();
                                break;
                            case 6:
                                cc.log("===闪现==="), this.role_node.showFlashSkill();
                        }
                }),
                __decorate([l], t)
            );
        })(n.default));
o.default = c;
